package com.isoft.c2team3service2.controller;

import com.isoft.c2team3service2.dto.StarAvatarDTO;
import com.isoft.c2team3service2.service.StarAvatarService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/api/star-avatars")
@RequiredArgsConstructor
@CrossOrigin(origins = "*")
public class StarAvatarController {

    private final StarAvatarService starAvatarService;

    @GetMapping
    public ResponseEntity<List<StarAvatarDTO>> getStarAvatars() {
        return ResponseEntity.ok(starAvatarService.getStarAvatarList());
    }
}